04. Downloading Twilio

How to Download and Install the Twilio Package

Below are the instructions for installing Twilio on Windows, Macintosh, and Linux computers.

Preface

Twilio works in several countries (the United States, Australia, the UK, and others) but currently, full support outside of North America and Europe is not guaranteed. A list of supported countries is available on Twilio's site. Note that you'll have to scroll down to the "SMS Enabled Phone Numbers" section.

NOTE: If you are in a country that does not support Twilio, feel free to skip this section and proceed with the content that follows.

Background

Python developers often use the pip package manager to download and install useful packages.

If you have Python 2.7.9 or later installed on your computer, you should also have pip installed by default.

You can use pip at the command line to install the twilio package as follows:

~ $ pip install twilio

Install Verification

At the command line, you can verify that Twilio has been properly installed. To do so, enter the Python interpreter by executing the following command:

~ $ python

Then, you’ll need to import the twilio package by executing the following two commands in the Python interpreter:

import twilio
print twilio.__version__

If you see a version number (and not an error message) as an output, your installation was successful. Continue on to the next section.